package com.example.xxpk.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.example.xxpk.pojo.BoxRewardTypes;
import org.apache.ibatis.annotations.Select;

/**
 * <p>
 *  Mapper 接口
 * </p>
 *
 * @author zhangguihong
 * @since 2025-02-19
 */
public interface BoxRewardTypesMapper extends BaseMapper<BoxRewardTypes> {

    @Select("SELECT * FROM box_reward_types WHERE box_type =#{type} ORDER BY RAND() LIMIT 1")
    BoxRewardTypes getRandomRecordByBoxTypeOne(Integer type);
}
